package com.xdtech.trans.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.sql.Timestamp;

import com.xdtech.core.model.BaseItem;
import com.xdtech.core.orm.utils.BeanUtils;
import com.xdtech.sys.util.SessionContextUtil;
import com.xdtech.sys.vo.UserItem;
import com.xdtech.trans.model.TransOrderScan;

import com.xdtech.web.freemark.item.GridColumn;

/**
 * 
 * @author max.zheng
 * @create 2015-06-08 23:17:52
 * @since 1.0
 * @see
 */
public class OrderStartScanItem extends BaseItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private Long id;
	@GridColumn(title="运单号",width=100)
	private String orderNo;
	@GridColumn(title="收件人",width=100)
	private String receiver;
	@GridColumn(title="寄件人",width=100)
	private String sender;
	@GridColumn(title="寄件电话",width=100)
	private String sendPhone;
	@GridColumn(title="货物名称",width=100)
	private String goodsName;
	@GridColumn(title="件数",width=100)
	private Integer goodsNum;
	@GridColumn(title="重量KG",width=100)
	private Double weight;
	@GridColumn(title="体积",width=100)
	private Double volume;
	@GridColumn(title="扫描时间",width=125)
	private String scanTime;
	@GridColumn(title="扫描员",width=100)
	private String scanOperator;
	@GridColumn(title="寄件网点",width=100)
	private String startWebsite;
	@GridColumn(title="目的网点",width=100)
	private String endWebsite;
//	@GridColumn(title="寄件网点ID",width=100)
	private Long startWebsiteId;
//	@GridColumn(title="目的网点ID",width=100)
	private Long endWebsiteId;
//	@GridColumn(title="扫描类型",width=100)
	private String scanType;
//	@GridColumn(title="下一站网点",width=100)
	private String nextWebsite;
//	@GridColumn(title="下一站网点ID",width=100)
	private Long nextWebsiteId;
//	@GridColumn(title="司机",width=100)
	private String driver;
//	@GridColumn(title="司机电话",width=100)
	private String driverPhone;
//	@GridColumn(title="车牌号",width=100)
	private String carNum;
//	@GridColumn(title="派件人",width=100)
	private String deliveryName;
//	@GridColumn(title="签收人",width=100)
	private String signName;
//	@GridColumn(title="签收时间",width=100)
	private String signTime;
//	@GridColumn(title="签收状态",width=100)
	private String signStatus;
//	@GridColumn(title="备注信息",width=100)
	private String remark;
	
	private String creator;

	public void setId(Long id) {
		this.id = id;
		addQuerys("id", id);
	}
	public Long getId() {
		return id;
	}
	
	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
		addQuerys("orderNo", orderNo);
	}
	public String getOrderNo() {
		return orderNo;
	}
	
	public void setReceiver(String receiver) {
		this.receiver = receiver;
		addQuerys("receiver", receiver);
	}
	public String getReceiver() {
		return receiver;
	}
	
	public void setSender(String sender) {
		this.sender = sender;
		addQuerys("sender", sender);
	}
	public String getSender() {
		return sender;
	}
	
	
	
	public String getSendPhone() {
		return sendPhone;
	}
	public void setSendPhone(String sendPhone) {
		this.sendPhone = sendPhone;
		addQuerys("sendPhone", sendPhone);
	}
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
		addQuerys("goodsName", goodsName);
	}
	public String getGoodsName() {
		return goodsName;
	}
	
	public void setGoodsNum(Integer goodsNum) {
		this.goodsNum = goodsNum;
		addQuerys("goodsNum", goodsNum);
	}
	public Integer getGoodsNum() {
		return goodsNum;
	}
	
	public void setWeight(Double weight) {
		this.weight = weight;
		addQuerys("weight", weight);
	}
	public Double getWeight() {
		return weight;
	}
	
	public void setVolume(Double volume) {
		this.volume = volume;
		addQuerys("volume", volume);
	}
	public Double getVolume() {
		return volume;
	}
	
	public void setScanOperator(String scanOperator) {
		this.scanOperator = scanOperator;
		UserItem currentUser = SessionContextUtil.getCurrentUser();
		if (!currentUser.isSuperuser())
		{
			addQuerys("scanOperator", scanOperator);
		}
	}
	public String getScanOperator() {
		return scanOperator;
	}
	
	public void setStartWebsite(String startWebsite) {
		this.startWebsite = startWebsite;
		addQuerys("startWebsite", startWebsite);
	}
	public String getStartWebsite() {
		return startWebsite;
	}
	
	public void setEndWebsite(String endWebsite) {
		this.endWebsite = endWebsite;
		addQuerys("endWebsite", endWebsite);
	}
	public String getEndWebsite() {
		return endWebsite;
	}
	
	public void setStartWebsiteId(Long startWebsiteId) {
		this.startWebsiteId = startWebsiteId;
		addQuerys("startWebsiteId", startWebsiteId);
	}
	public Long getStartWebsiteId() {
		return startWebsiteId;
	}
	
	public void setEndWebsiteId(Long endWebsiteId) {
		this.endWebsiteId = endWebsiteId;
		addQuerys("endWebsiteId", endWebsiteId);
	}
	public Long getEndWebsiteId() {
		return endWebsiteId;
	}
	
	public void setScanType(String scanType) {
		this.scanType = scanType;
		addQuerys("scanType", scanType);
	}
	public String getScanType() {
		return scanType;
	}
	
	public void setNextWebsite(String nextWebsite) {
		this.nextWebsite = nextWebsite;
		addQuerys("nextWebsite", nextWebsite);
	}
	public String getNextWebsite() {
		return nextWebsite;
	}
	
	public void setNextWebsiteId(Long nextWebsiteId) {
		this.nextWebsiteId = nextWebsiteId;
		addQuerys("nextWebsiteId", nextWebsiteId);
	}
	public Long getNextWebsiteId() {
		return nextWebsiteId;
	}
	
	public void setDriver(String driver) {
		this.driver = driver;
		addQuerys("driver", driver);
	}
	public String getDriver() {
		return driver;
	}
	
	public void setDriverPhone(String driverPhone) {
		this.driverPhone = driverPhone;
		addQuerys("driverPhone", driverPhone);
	}
	public String getDriverPhone() {
		return driverPhone;
	}
	
	public void setScanTime(String scanTime) {
		this.scanTime = scanTime;
		addQuerys("scanTime", scanTime);
	}
	public String getScanTime() {
		return scanTime;
	}
	
	public void setCarNum(String carNum) {
		this.carNum = carNum;
		addQuerys("carNum", carNum);
	}
	public String getCarNum() {
		return carNum;
	}
	
	public void setDeliveryName(String deliveryName) {
		this.deliveryName = deliveryName;
		addQuerys("deliveryName", deliveryName);
	}
	public String getDeliveryName() {
		return deliveryName;
	}
	
	public void setSignName(String signName) {
		this.signName = signName;
		addQuerys("signName", signName);
	}
	public String getSignName() {
		return signName;
	}
	
	public void setSignTime(String signTime) {
		this.signTime = signTime;
		addQuerys("signTime", signTime);
	}
	public String getSignTime() {
		return signTime;
	}
	
	public void setSignStatus(String signStatus) {
		this.signStatus = signStatus;
		addQuerys("signStatus", signStatus);
	}
	public String getSignStatus() {
		return signStatus;
	}
	
	public void setRemark(String remark) {
		this.remark = remark;
		addQuerys("remark", remark);
	}
	public String getRemark() {
		return remark;
	}
	
	public String getCreator() {
		return creator;
	}
	public void setCreator(String creator) {
		this.creator = creator;
		addQuerys("creator", creator);
	}
	/**
	 * 根据model构建vo
	 * 
	 * @author max
	 * @return
	 */
	public static OrderStartScanItem createItem(TransOrderScan transOrderScan) {
		OrderStartScanItem transOrderScanItem = new OrderStartScanItem();
		BeanUtils.copyProperties(transOrderScanItem, transOrderScan);
		//自定义属性设置填充
		return transOrderScanItem;
	}
	/**
	 * 根据model集合创建vo集合
	 * 
	 * @author max
	 * @return
	 */
	public static List<OrderStartScanItem> createItems(List<TransOrderScan> transOrderScans) {
		List<OrderStartScanItem> transOrderScanItems = new ArrayList<OrderStartScanItem>();
		for (TransOrderScan transOrderScan : transOrderScans) {
			transOrderScanItems.add(createItem(transOrderScan));
		}
		return transOrderScanItems;
	}
}
